<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/head.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="javascript" type="text/javascript"
	src="<%=WEBPATH%>/scripts/provinceCity.js?s=<%=generate%>"></script>
<script language="javascript" type="text/javascript"
	src="<%=WEBPATH%>/scripts/chinaCityData.js?s=<%=generate%>"></script>
<title><html:text name="sys.name" /></title>
</head>
<body>
<html:form action="/client/save.crm" id="saveForm">
<html:token/>
	<table class="input-table" cellspacing="0" cellpadding="0" border="0"
		align="center" width="100%">
		<tr>
			<td colspan="4" class="x-panel-header" style="text-align:center;"><html:text
				name="client.action" /></td>
		</tr>
		<html:if test="myMessage!=null">
		<tr>
			<td colspan="4"  style="text-align:center;"><html:property value="myMessage" escape="false"/></td>
		</tr>
		</html:if>
		<tr>
			<td colspan="4" style="text-align:center;"><input type="button"
				onclick="javascript:saveFunction();" class="x-btn" id="saveButton" name="saveButton"
				value=" <html:text name="button.save"/> ">&nbsp;<input type="button" name="backButton"
				onclick="javascript:backFunction();" id="backButton"
				value=" <html:text name="button.back"/> "></td>
		</tr>
		<tr>
			<td colspan="4" class="td-input"><br></br>
			<b><html:text name="categoryValue.basic"></html:text></b>
			<hr style="width: 100%;"></hr>
			</td>
		</tr>
		<tr>
			<td colspan="4"><!--fieldset
				style="padding: 5px; LINE-HEIGHT: 170px; HEIGHT: 210px; width: 96%">
			<legend><html:text name="categoryValue.basic"></html:text></legend-->
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="16%" class="red"><html:text
						name="client.clientCode"></html:text></td>
					<td width="34%" class="td-input"><html:hidden id="customerBean.id"
						name="customerBean.id" /><html:hidden id="feedbackKeyAndValue"
						name="feedbackKeyAndValue" /><html:textfield dataType="string" dataLength="100" dataRequire="true"
						id="customerBean.clientCode" name="customerBean.clientCode"></html:textfield></td>
					<td width="16%" ><html:text
						name="client.clientName"></html:text></td>
					<td width="34%" class="td-input"><html:textfield id="customerBean.clientName"
						name="customerBean.clientName"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.clientLevel"></html:text></td>
					<td class="td-input"><html:select list="customerLevels" listValue="name"
						listKey="id" id="customerBean.clientLevel"
						name="customerBean.clientLevel"></html:select></td>
					<td><html:text name="client.clientSource"></html:text></td>
					<td class="td-input"><html:select list="customerSources" listValue="name"
						listKey="id" id="customerBean.clientSource"
						name="customerBean.clientSource"></html:select></td>
				</tr>
				<tr>
					<td><html:text name="client.clientType"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.clientType"
						name="customerBean.clientType"></html:textfield></td>
					<td><html:text name="client.regionId"></html:text></td>
					<td class="td-input"><html:select list="customerRegions" listValue="name"
						listKey="id" id="customerBean.regionId"
						name="customerBean.regionId"></html:select></td>
				</tr>
				<tr>
					<td><html:text name="client.clientQuality"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.clientQuality"
						name="customerBean.clientQuality"></html:textfield></td>
					<td><html:text name="client.buyFlag"></html:text></td>
					<td class="td-input"><html:radio list="flags" listKey="id" listValue="value" id="customerBean.buyFlag"
						name="customerBean.buyFlag"></html:radio></td>
				</tr>
				<tr>
					<td colspan="4" class="td-input"><br></br>
					<b><html:text name="client.clientRemark"></html:text></b>
					<hr style="width: 100%;"></hr>
					</td>
				</tr>
				<tr>
					<td colspan="4" class="td-input"><html:textarea id="customerBean.clientRemark"
						name="customerBean.clientRemark" rows="4" cssStyle="width:80%;" />
					</td>
				</tr>
				<tr>
					<td colspan="4" class="td-input"><br></br>
					<b><html:text name="client.conn"></html:text></b>
					<hr style="width: 100%;"></hr>
					</td>
				</tr>
				<tr>
					<td><html:text name="client.provinceId"></html:text></td>
					<td class="td-input"><html:select list="provinceBeans" listValue="name"
						listKey="id" id="customerBean.provinceId"
						name="customerBean.provinceId"></html:select></td>
					<td><html:text name="client.cityId"></html:text></td>
					<td class="td-input"><html:select list="cityBeans" listValue="name"
						listKey="id" id="customerBean.cityId" name="customerBean.cityId"></html:select></td>
				</tr>
				<tr>
					<td><html:text name="client.fax"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.fax"
						name="customerBean.fax"></html:textfield></td>
					<td><html:text name="client.postCode"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.postCode"
						name="customerBean.postCode"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.mainTelephone"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.mainTelephone"
						name="customerBean.mainTelephone"></html:textfield></td>
					<td><html:text name="client.telephone"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.telephone"
						name="customerBean.telephone"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.address"></html:text></td>
					<td colspan="3" class="td-input"><html:textfield id="customerBean.address"
						name="customerBean.address" cssStyle="width:80%;"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.mobile"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.mobile"
						name="customerBean.mobile"></html:textfield></td>
					<td><html:text name="client.email"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.email"
						name="customerBean.email"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.web"></html:text></td>
					<td colspan="3" class="td-input"><html:textfield id="customerBean.web"
						name="customerBean.web"></html:textfield></td>

				</tr>
				<tr>
					<td colspan="4" class="td-input"><br></br>
					<b><html:text name="client.cinfor"></html:text></b>
					<hr style="width: 100%;"></hr>
					</td>
				</tr>
				<tr>
					<td><html:text name="client.dealing"></html:text></td>
					<td colspan="3" class="td-input"><html:select list="customerDealings" listValue="name"
						listKey="id" id="customerBean.dealing" name="customerBean.dealing"></html:select></td>
				</tr>
				<tr>
					<td><html:text name="client.clientScale"></html:text></td>
					<td class="td-input"><html:select list="customerScales" listValue="name"
						listKey="id" id="customerBean.clientScale" name="customerBean.clientScale"></html:select></td>
					<td><html:text name="client.registerMoney"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.registerMoney"
						name="customerBean.registerMoney"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.clientKind"></html:text></td>
					<td class="td-input"><html:select id="customerBean.clientKind"
						name="customerBean.clientKind" list="customerKinds"
						listValue="name" listKey="id">
					</html:select></td>
					<td><html:text name="client.clientTrade"></html:text></td>
					<td class="td-input"><html:select id="customerBean.clientTrade"
						name="customerBean.clientTrade" list="customerTrades"
						listValue="name" listKey="id"></html:select></td>
				</tr>
				<tr>
					<td><html:text name="client.clientArtificial"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.clientArtificial"
						name="customerBean.clientArtificial"></html:textfield></td>
					<td><html:text name="client.clientBank"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.clientBank"
						name="customerBean.clientBank"></html:textfield></td>
				</tr>
				<tr>
					<td><html:text name="client.clientAccount"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.clientAccount"
						name="customerBean.clientAccount"></html:textfield></td>
					<td><html:text name="client.taxCode"></html:text></td>
					<td class="td-input"><html:textfield id="customerBean.taxCode"
						name="customerBean.taxCode"></html:textfield></td>
				</tr>
				<html:if test='extendCustomer!=null&&extendCustomer!=""'>
					<tr>
						<td colspan="4" class="td-input"><br></br>
						<b><html:text name="entity.customauto"></html:text></b>
						<hr style="width: 100%;"></hr>
						</td>
					</tr>
					<html:property value="extendCustomer" escape="false"/>
				</html:if>
			</table>
			<!-- /fieldset--></td>
			<% 
				com.opensymphony.xwork2.util.ValueStack  obj=(com.opensymphony.xwork2.util.ValueStack)request.getAttribute("struts.valueStack");
				obj.setValue("customerBean", null); 
			%>
		</tr>
	</table>
	<script type="text/javascript" language="javascript">
		//var provCity = new ProvCity(); 
		//provCity.init('',''); 
		function backFunction(){
			window.location="<%=WEBPATH%>/client/index.crm";
		}
	</script>
</html:form>
</body>
</html>